﻿<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?1249c72ac5b5d37877006abf20c7c9bc";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=da1b8e0422adf3be61850d0008292621"></script>


<head>
    <title>Our Love Story -</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <style type="text/css">
        @font-face {
            font-family: digit;
            src: url('digital-7_mono.ttf') format("truetype");
        }
    </style>
    <link href="style/default.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="style/jquery.js"></script>
    <script type="text/javascript" src="style/garden.js"></script>
    <script type="text/javascript" src="style/functions.js"></script>
</head>

<body>
    <div id="mainDiv">
        <div id="content">
            <div class="jingweidu"></div>
            <div id="code">
                <span class="comments">/**</span><br />
                <span class="space"/><span class="comments">* 我喜欢带来温暖的微风,</span><br />
                <span class="space"/><span class="comments">* 我喜欢有你栖身的小城。</span><br />
                <span class="space"/><span class="comments">* 我也喜欢你用尽小心思的那一句好梦。</span><br />

                <!-- <span class="space"/><span class="comments">*/</span><br />
                Boy i = <span class="keyword">new</span> Boy(<span class="string">"boyname"</span>);<br />
                Girl u = <span class="keyword">new</span> Girl(<span class="string">"girlname"</span>);<br />
                <span class="comments">// April 28, 2012, I told you I love you. </span><br />
                i.love(u);<br />
                <span class="comments">// but..., what you said that meaning we are still good friends.</span><br />
                u.sayOtherthing();<br />
                <span class="comments">// Since then, I ask you for the reason.</span><br />
                <span class="keyword">var</span> reason=i.ask(u);<br />
                <span class="comments">// you say we were not understand enough for each other .</span><br />
                $("body").append(reason);<br />
                <span class="comments">// You say that it is too quickily to turn our relation of lover.</span><br />
                <span class="comments">// And take care of u and our love.</span><br />
                i.takeCareOf(u);<br />
                <span class="comments">// So I keep waiting and I have confidence that you will.</span><br />
                <span class="keyword">boolean</span> isAccept = <span class="keyword">false</span>;<br />
                <span class="keyword">while</span> (isAccept) {<br />
                <span class="placeholder"/>i.waitFor(u);<br />
                <span class="placeholder"/><span class="comments">// I think it is an important decision</span><br />
                <span class="placeholder"/><span class="comments">// and you should forgot the unhappy things that happended before.</span><br />
                <span class="placeholder"/>isAccept = u.thinkOver();<br />
                }<br />
                <span class="comments">// After a please sound of accept, we will live happily ever after.</span><br />
                u.accept(i);<br />
                i.liveHappilyWith(u);<br /> -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3712320065678109";
/* lovead */
google_ad_slot = "0650322805";
google_ad_width = 320;
google_ad_height = 50;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
            </div>
            <div id="loveHeart" style="width: 100%;height: 50vh;">
                <canvas id="garden"></canvas>
                <div id="words">
                    <div id="messages">
<center>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3712320065678109";
/* lovead */
google_ad_slot = "0650322805";
google_ad_width = 320;
google_ad_height = 50;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
                        Lu, I Love u forever and ever.
                        <div id="elapseClock" ></div>
                        <!-- <a href='#' id="accept">click me if accept me</a> -->
                    </div>
                    <div id="loveu">
                        今日如是，此生如是。<br/>
                        <div class="signature">- 心肝</div>
                    </div>
                </div>
            </div>
        </div>
        <div id="copyright">
            <!-- 程序改编: <a href="http://www.crazyiter.com/">疯狂的IT人</a><br /> -->
        </div>
    </div>
    <script type="text/javascript">
        var offsetX = $("#loveHeart").width() / 2;
        var offsetY = $("#loveHeart").height() / 2 - 55;
        
        if (!document.createElement('canvas').getContext) {
            var msg = document.createElement("div");
            msg.id = "errorMsg";
            msg.innerHTML = "Your browser doesn't support HTML5!<br/>Recommend use Chrome 14+/IE 9+/Firefox 7+/Safari 4+"; 
            document.body.appendChild(msg);
            $("#code").css("display", "none")
            $("#copyright").css("position", "absolute");
            $("#copyright").css("bottom", "10px");
            document.execCommand("stop");
        } else {
            setTimeout(function () {
                adjustWordsPosition();
                startHeartAnimation();
                $("#elapseClock").show();
                var together = new Date(2021,0,2);
                timeElapse(together);
                setInterval(function () {
                    timeElapse(together);
                }, 500);
            }, 10000);
            
            $("#accept").click(function(){
                
            })
            adjustCodePosition();
            $("#code").typewriter();
        }
    </script>
</body>
</html>
<!-- <script type="text/javascript">
    var map = new AMap.Map('container', {
        resizeEnable: true
    });
    AMap.plugin('AMap.Geolocation', function() {
        var geolocation = new AMap.Geolocation({
            enableHighAccuracy: true,//是否使用高精度定位，默认:true
            timeout: 10000,          //超过10秒后停止定位，默认：5s
            buttonPosition:'RB',    //定位按钮的停靠位置
            buttonOffset: new AMap.Pixel(10, 20),//定位按钮与设置的停靠位置的偏移量，默认：Pixel(10, 20)
            zoomToAccuracy: true,   //定位成功后是否自动调整地图视野到定位点

        });
        map.addControl(geolocation);
        geolocation.getCurrentPosition(function(status,result){
            if(status=='complete'){
                onComplete(result)
            }else{
                onError(result)
            }
        });
    });
    //解析定位结果
    function onComplete(data) {
        console.log(data)
        document.querySelector('.jingweidu').innerHTML=data.position
        var str = [];
        str.push('定位结果：' + data.position);
        str.push('定位类别：' + data.location_type);
        if(data.accuracy){
             str.push('精度：' + data.accuracy + ' 米');
        }//如为IP精确定位结果则没有精度信息
        str.push('是否经过偏移：' + (data.isConverted ? '是' : '否'));
        document.getElementById('result').innerHTML = str.join('<br>');
    }
    //解析定位错误信息
    function onError(data) {
        
    }
</script> -->




<!-- <script>
  

if (navigator.geolocation){//如果getCurrentPosition()运行成功， //则向参数showPosition中规定的函数返回一个coordinates对象
　　navigator.geolocation.getCurrentPosition(showPosition);
}


function showPosition(position){  //showPosition() 函数获得并显示经度和纬度
    let address = position.coords.longitude+','+position.coords.latitude;
    var xhr = new XMLHttpRequest();
    xhr.open('get','https://digitaltest.crecrainbowhouse.com:20203/api/app/ann/addTest'+'?'+'value='+address);
    
    xhr.send();
    xhr.onreadystatechange = function () {
        // 这步为判断服务器是否正确响应
    if (xhr.readyState == 4 && xhr.status == 200) {
        console.log(xhr);
    }
    };
}
</script> -->